﻿/*
    Copyright 2010, 2011 Eric Wong
	contact@optimalcycling.com
	http://www.optimalcycling.com
	Optimal Cycling - Advanced power pacing program for cyclists
	
	This file is part of Optimal Cycling.

    Optimal Cycling is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    Optimal Cycling is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public License
    along with Optimal Cycling.  If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef _FILE_POWER_METRICS_H
#define _FILE_POWER_METRICS_H

#ifndef __OPENCL_VERSION__
	#include "Options.h"
	#include "Constants.h"
	#include "Vector.h"
#endif

/// <summary>
/// What power metric types we can use
/// </summary>
typedef enum 
{
    PMTypes_CCAP,
    PMTypes_Average,
    PMTypes_GeneralMean,
	PMTypes_NUM_COUNT
} PMTypes;

/// <summary>
/// Parameters for the CCAP power metric
/// </summary>
typedef struct 
{
	real posFactor;
	real maxPosPowerRate;
	real negFactor;
	real minNegPowerRate;

    real powerRateCoeff;
    real powerRateExp;
    real powerRateExpInverse;
    real powerCurveExp;
    real powerCurveExpInverse;
    real ftp;

    real gmExp;
    real gmExpInverse;
    real gmExpPlusOne;
    real gmRollingAveTime;
	int gmRollingAveIsExp;
	real gmSamplingInterval;

	PMTypes pmType;

	sizeT numCriticals;
} PowerMetricsInfo;

#endif		// _FILE_POWER_METRICS_H

